home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / endo / defines.h < prev    next >
C/C++ Source or Header  |  1995-05-03  |  4KB  |  156 lines

  1. /*************************************************************************
  2.  *                                                                       *
  3.  *  Copyright (c) 1992, 1993 Ronald Joe Record                           *
  4.  *                                                                       *
  5.  *  All rights reserved. No part of this program or publication may be   *
  6.  *  reproduced, transmitted, transcribed, stored in a retrieval system,  *
  7.  *  or translated into any language or computer language, in any form or *
  8.  *  by any means, electronic, mechanical, magnetic, optical, chemical,   *
  9.  *  biological, or otherwise, without the prior written permission of:   *
  10.  *                                                                       *
  11.  *      Ronald Joe Record (408) 458-3718                                 *
  12.  *      212 Owen St., Santa Cruz, California 95062 USA                   *
  13.  *                                                                       *
  14.  *************************************************************************/
  15.  
  16. #ifndef DEFINES_H
  17. #define ABS(a)    (((a)<0) ? (0-(a)) : (a) )
  18. #define Min(x,y) ((x < y)?x:y)
  19. #define Max(x,y) ((x > y)?x:y)
  20. #define MAXPARAMS 24
  21. #define MAXDEMOS 10
  22. #define HALF 12
  23. #define STRIPE 7
  24. #define CG 1
  25. #define WINDOW_DISTANCE 10.0
  26. #define S_HEIGHT (XDisplayHeight(dpy, screen) - 40)
  27. #define S_WIDTH XDisplayWidth(dpy, screen)
  28. #define INFO_WIDTH 130
  29. #define INFO_HEIGHT 27
  30. #define HELP_WIDTH 70
  31. #define HELP_HEIGHT 50
  32. #define THERMWIDTH 80
  33. #define TITS_WIDTH 200
  34. #define TITS_HEIGHT 100
  35.  
  36. #define TITLE_NAME "Introducing"
  37. #define TRAJ_NAME "Point Trajectories"
  38. #define ATTR_NAME "Basins of Attraction"
  39. #define CRIT_NAME "Critical Curves"
  40. #define PRE_NAME "Pre-Critical Curves"
  41. #define INFO_NAME "Parameter Values"
  42. #define HELP_NAME "Help"
  43. #define HIST_NAME "Histogram of Point Trajectories"
  44. #define BIF_NAME "Bifurcation Diagrams"
  45. #define LYAP_NAME "Lyapunov Exponents"
  46. #define BAR_NAME "Color Index"
  47. #define ADJ_NAME "Index Map"
  48. #define SELECT_NAME \
  49.       "Select  Highlighted  Setup  with  Right  Mouse  Button  or  Space  Bar"
  50. #define MAXFRAMES 1
  51. #ifndef MAXPOINTS
  52. #define MAXPOINTS  128
  53. #endif
  54. #ifndef MAXCOLOR
  55. #define MAXCOLOR  256
  56. #endif
  57. #define MAXATTRS  1024
  58. #define DEMO_WIDTH 512
  59. #define DEMO_HEIGHT 8
  60. #define DEMO_DWELL 128
  61. #define DEMO_SETTLE 128
  62. #define DEMO_16_WIDTH 200
  63. #define DEMO_16_HEIGHT 2
  64. #define HISBARWID 50
  65. #define HISBARHGT 480
  66. #define ADJWIDTH 256
  67. #define ADJHEIGHT 256
  68. #define MAXDIVS 12
  69. #ifdef NorthSouth
  70. #ifdef Gardini
  71. #ifdef Plendo
  72. #define NUMMAPS 29    /* remember to change NUMDEFS as well */
  73. #define NUMDEFS 58    /* always twice NUMMAPS */
  74. #define MAP_OFF 4    /* Map index offset */
  75. #else
  76. #define NUMMAPS 23    /* remember to change NUMDEFS as well */
  77. #define NUMDEFS 46    /* always twice NUMMAPS */
  78. #define MAP_OFF 4    /* Map index offset */
  79. #endif
  80. #else
  81. #ifdef Plendo
  82. #define NUMMAPS 26    /* remember to change NUMDEFS as well */
  83. #define NUMDEFS 52    /* always twice NUMMAPS */
  84. #define MAP_OFF 1    /* Map index offset */
  85. #else
  86. #define NUMMAPS 22    /* remember to change NUMDEFS as well */
  87. #define NUMDEFS 44    /* always twice NUMMAPS */
  88. #define MAP_OFF 1    /* Map index offset */
  89. #endif
  90. #endif
  91. #else
  92. #ifdef Gardini
  93. #ifdef Plendo
  94. #define NUMMAPS 28    /* remember to change NUMDEFS as well */
  95. #define NUMDEFS 56    /* always twice NUMMAPS */
  96. #define MAP_OFF 3    /* Map index offset */
  97. #else
  98. #define NUMMAPS 24    /* remember to change NUMDEFS as well */
  99. #define NUMDEFS 48    /* always twice NUMMAPS */
  100. #define MAP_OFF 3    /* Map index offset */
  101. #endif
  102. #else
  103. #ifdef Plendo
  104. #define NUMMAPS 25    /* remember to change NUMDEFS as well */
  105. #define NUMDEFS 50    /* always twice NUMMAPS */
  106. #define MAP_OFF 0    /* Map index offset */
  107. #else
  108. #define NUMMAPS 21    /* remember to change NUMDEFS as well */
  109. #define NUMDEFS 42    /* always twice NUMMAPS */
  110. #define MAP_OFF 0    /* Map index offset */
  111. #endif
  112. #endif
  113. #endif
  114. #ifndef NULL
  115. #define NULL 0
  116. #endif
  117. #ifndef TRUE
  118. #define TRUE 1
  119. #define FALSE 0
  120. #endif
  121. #ifndef M_PI
  122. #define M_PI 3.14159265358979323846
  123. #endif
  124. #ifndef M_2PI
  125. #define M_2PI 6.28318530717958647692
  126. #endif
  127. #ifndef M_PI_2
  128. #define M_PI_2 1.5707963267948965580
  129. #endif
  130. #ifndef M_LOG2E
  131. #define M_LOG2E    1.4426950408889634074
  132. #endif
  133.  
  134. typedef struct {
  135.     int x, y;
  136. } xy_t;
  137.  
  138. typedef struct {
  139.     int start_x, start_y;
  140.     int last_x, last_y;
  141.     } rubber_band_data_t;
  142.  
  143. typedef struct {
  144.     double x;
  145.     double y;
  146. } pair;
  147.  
  148. typedef struct {
  149.     double x, y, z;
  150. } triple;
  151.  
  152. typedef pair (*PFP)();
  153.  
  154. #define DEFINES_H
  155. #endif
  156.